Skip to content

fix(forms): stop long pathway step codes overflowing the decision context#824

Closed
BigSimmo wants to merge 1 commit into
mainfrom
claude/form-sizing-design-8hebku
Closed

fix(forms): stop long pathway step codes overflowing the decision context#824
BigSimmo wants to merge 1 commit into
mainfrom
claude/form-sizing-design-8hebku

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

Re-opens the final piece of the form-code overflow cleanup (previously #742, which was closed before landing; #728 and #734 are already merged). The decision-context "Pathway" card on the form detail page renders each before/parallel/after step code in a fixed-width column. pathwayItems keeps the raw string as the code when it matches a form-code shape — which includes qualified codes like 6B attachment (form 6B lists it as a parallel step) — so the code cell overflowed into the title.

  • Adds a PathwayStepCode helper that renders only the split head (6B) in the compact code cell, reusing the shared splitFormCode from form-code-badge, with truncation.
  • The full code is exposed to assistive tech via an sr-only label (the decorative head is aria-hidden) and to sighted users via a tooltip — matching FormCodeBadge's pattern. The adjacent title column already shows the full label, so nothing is lost.

Scope note: presentational only — one component (form-detail-page.tsx), no data/routing/retrieval/answer/governance behaviour touched. This is a clean single commit rebased onto the current main.

Verification

  • npx eslint src/components/forms/form-detail-page.tsx — clean
  • npx prettier --check — clean
  • node scripts/check-type-scale.mjs --strict — passes
  • npx vitest run tests/forms.test.ts tests/forms-clipboard-fallback.test.ts — 6/6 pass
  • npm run typecheck — no new errors in the changed file (pre-existing failures are missing @testing-library/@axe-core/playwright dev deps in tests/, identical on base)
  • Browser QA (in the prior fix(forms): stop long pathway step codes overflowing the decision context #742 iteration): /forms/form-6b decision-context, whose parallel step is 6B attachment — the code cell shows 6B with 6B attachment in the title column, fully contained; 1A/6A/Step rows unaffected
  • UI verification not run: the npm run verify:ui gate requires @axe-core/playwright, not installed in this environment; verified visually with the pre-installed Chromium via playwright-core instead.

Risk and rollout

  • Risk: low — presentational change to one component; renders a shorter code label in a compact sidebar cell.
  • Rollback: revert the single commit on this branch; no migrations or state.
  • Provider or production effects: None / not applicable.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

🤖 Generated with Claude Code


Generated by Claude Code

…text

The before/parallel/after lists in the decision-context card render each
step code in a fixed-width column. `pathwayItems` keeps the raw string as
the code when it matches a form-code shape — which includes qualified
codes like "6B attachment" (form 6B lists it as a parallel step) — so the
code cell overflowed into the title.

Add a PathwayStepCode helper that renders only the split head ("6B") in
that compact cell (reusing the shared splitFormCode), with truncation. The
full code is exposed to assistive tech via an sr-only label with the
decorative head marked aria-hidden, and to sighted users via a tooltip,
matching FormCodeBadge's pattern; the adjacent title column already shows
the full label, so nothing is lost.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJY1EzEXiBayz13Q6p2GwL
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@BigSimmo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 21c1ad55-35ad-40c9-92fd-1297028218ee

📥 Commits

Reviewing files that changed from the base of the PR and between 77ab4a6 and aa0cb78.

📒 Files selected for processing (1)
  • src/components/forms/form-detail-page.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/form-sizing-design-8hebku

Comment @coderabbitai help to get the list of available commands.

@supabase

supabase Bot commented Jul 18, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review July 18, 2026 06:58
@BigSimmo
BigSimmo enabled auto-merge July 18, 2026 06:59
@BigSimmo BigSimmo closed this Jul 18, 2026
auto-merge was automatically disabled July 18, 2026 07:02

Pull request was closed

@BigSimmo
BigSimmo deleted the claude/form-sizing-design-8hebku branch July 18, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants